package com.example.fitapp.activity.http.util;

import java.util.UUID;

import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;

public class ImagePost {
    public static void post(String url, RequestBody requestBody, Callback callback){
        OkHttpClient client = new OkHttpClient.Builder()
                .addInterceptor(new BasicAuthInterceptor())
                .build();
        Request requestPost = new Request.Builder()
                .header("Authorization","Client-ID" + UUID.randomUUID())
                .url("https://fitapp.dashingdog.cn"+url)
                .post(requestBody)
                .build();
        client.newCall(requestPost).enqueue(callback);
    }
}
